import Vue from "vue";
import Vuex from "vuex";
import getters from "./getters";
import app from "./modules/app";
import settings from "./modules/settings";
import dictionary from "./modules/dictionary";
import tagsView from "./modules/tagsView";
import * as actions from "./actions";

Vue.use(Vuex);

const store = new Vuex.Store({
  modules: {
    app,
    settings,
    tagsView,
    dictionary,
  },
  state: {
    sidebarRoute: [],
  },
  mutations: {
    //侧边栏数据 展示侧边栏使用
    setSidebarRoute(state, sidebarRoute) {
      state.sidebarRoute = sidebarRoute;
    },
  },
  actions,
  getters,
});

export default store;
